import numpy as np
import matplotlib.pyplot as plt

rsp = [700, 1120, 1567, 1983, 2591]
speed = [0.5, 2.2, 2.85, 3.43, 3.87]

def rsp_to_force(rsp):
    a = 0.74e-4
    b = 1.84
    c = -3.98
    return a*rsp**2 + b*rsp + c

# 生成一系列 rsp 值用于绘图
rsp_values = np.linspace(min(rsp), max(rsp), 400)
force_values = rsp_to_force(rsp_values)

# 绘制 rsp_to_force 曲线
plt.figure(figsize=(8, 5))
plt.plot(rsp_values, force_values, label='RSP to Force')
plt.xlabel('RSP')
plt.ylabel('Force')
plt.title('RSP to Force Conversion Curve')
plt.grid(True)
plt.legend()
plt.show()